from pysnmp.entity.rfc3413.oneliner import cmdgen
cg = cmdgen.CommandGenerator()
comm_data = cmdgen.CommunityData('my-manager', 'public')
transport = cmdgen.UdpTransportTarget(('192.168.2.56', 161))
variables = (1, 3, 6, 1, 2, 1, 1)
errIndication, errStatus, errIndex, result = cg.nextCmd(comm_data, transport, variables)
print(errIndication)
errIndication, errStatus, errIndex, result = cg.nextCmd(comm_data, transport, variables)
print(errIndication)
print(errStatus)
print(errIndex)
for obj in result:
    print(obj)
